﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace ChinaTax.LeQi
{
    public class QueryUsableTaxRateInfoRequest : Request<QueryUsableTaxRateInfoResponse>
    {
        public QueryUsableTaxRateInfoRequest()
        {
            ServiceCode = "CXKYSL";
        }

        [JsonProperty("nsrsbh")]
        public string TaxNo { get => LeQiConfig.TaxNo; }
    }

    public class QueryUsableTaxRateInfoResponse : Response
    {
        [JsonProperty("count")]
        public int Count { get; set; }

        [JsonProperty("slzslList")]
        public List<TaxRateInfo> List { get; set; }
    }

    public class TaxRateInfo
    {
        [JsonProperty("csxz")]
        public string Property { get; set; }

        [JsonProperty("slzsl")]
        public string TaxRate { get; set; }

        [JsonProperty("yslbz")]
        public string OriginFlag { get; set; }

        [JsonProperty("dyysl")]
        public string dyysl { get; set; }

        [JsonProperty("cszt")]
        public string Status { get; set; }

        [JsonProperty("yxqq")]
        public string BeginDate { get; set; }

        [JsonProperty("yxqz")]
        public string EndDate { get; set; }

        [JsonProperty("tyrq")]
        public string StopDate { get; set; }
    }
}
